package com.xhxg.service.advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;

//XML方式配置AOP
public class AdviceXML {

    //前置通知
    public void before(JoinPoint joinPoint) {
        System.out.println("前置通知...");
    }
    //后置通知
    public void after() {
        System.out.println("后置通知..");
    }

    //环绕通知，
    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("环绕通知前...");
        //调用目标方法
        Object object = point.proceed();
        System.out.println("环绕通知后.");
        return object;
    }

}